<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:if="${message}">
    <h2 th:text="${message}"/>
</div>

<div>
    <form method="POST" enctype="multipart/form-data" action="/file/upload">
        <table>
            <tr>
                <td>File to upload:</td>
                <td><input type="file" name="file" /></td>
                <td>
                    <input type="submit" value="Upload" />
                </td>
            </tr>
        </table>
    </form>
</div>

<div>
    <table border="1">
        <thead>
        <tr>
            <td>Name</td>
            <td>ID</td>
            <td>contentType</td>
            <td>size</td>
            <td>uploadDate</td>
            <td>md5</td>
        </tr>
        </thead>
        <tbody>
        <tr th:if="${files.size()} eq 0">
            <td colspan="3">没有文件信息！！</td>
        </tr>
        <tr th:each="file : ${files}">
            <td><a th:href="'files/'+${file.id}" th:text="${file.name}" /></td>
            <td th:text="${file.id}" ></td>
            <td th:text="${file.contentType}" ></td>
            <td th:text="${file.size}" ></td>
            <td th:text="${file.uploadDate}" ></td>
            <td th:text="${file.md5}" ></td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>